package com.compton.UI
{
	import libs.WhiteWineBtn;
	
	public class WhiteBtn extends WhiteWineBtn
	{
		private var _label:String;
		private var _type:String; 
		
		public function WhiteBtn()
		{
			super();
			this.stop();
			this.buttonMode = true;
			this.tf_WineName.selectable = false;
		}

		/**
		 * Getter and setter for getting the required string that needs to be diplayed on the button and setting it onto the button 
		 * @return returns the label that was placed on the button 
		 * 
		 */		
		public function get label():String
		{
			return _label;
		}
		
		/**
		 * @private
		 */		
		public function set label(value:String):void
		{
			_label = value;
			updateUI();
		}
		
		//updates the text feild inside the button.
		private function updateUI():void
		{
			this.tf_WineName.text = _label;
		}

		/**
		 * Getter and Setter for know what type of button it is. Whether the button is for Wine or for Places.
		 * This helps with finding out which button was clicked and what type of information is held within it. 
		 * @return Returns the type of button that was created, whether wine or place.
		 * 
		 */		
		public function get type():String
		{
			return _type;
		}

		/**
		 * @private
		 */		
		public function set type(value:String):void
		{
			_type = value;
		}
	}
}